package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/7/4.
 */
public class ForgotPasswordStep3Action extends AHttpService<PbBean.PbResUserForgotPasswordStep3> {

    private String mobile;
    private String verificationCode;
    private String newPassword;

    public static ForgotPasswordStep3Action newInstance(Context context, String mobile, String verificationCode, String newPassword) {
        return new ForgotPasswordStep3Action(context, mobile, verificationCode, newPassword);
    }

    private ForgotPasswordStep3Action(Context context, String mobile, String verificationCode, String newPassword) {
        super(context);
        this.mobile = mobile;
        this.verificationCode = verificationCode;
        this.newPassword = newPassword;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserForgotPasswordStep3.Builder builder = PbBean.PbReqUserForgotPasswordStep3.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setMobile(mobile);
        builder.setVerificationCode(verificationCode);
        builder.setNewPassword(newPassword);

        return apiService.forgotPasswordStep3(builder.build());
    }
}
